#ifndef UERU_TWEEN_HPP
#define UERU_TWEEN_HPP

#include <vector>

class Tween
{
private:
	Tween();

public:
	static Tween* Create(float* target, float from, float to, float duration);

	static void UpdateAll(float dt);

	void Update(float dt);

	bool IsActive() { return m_active; }

	void SetActive(bool a) { m_active = a; }

	float startValue;
	float endValue;
	float duration;

private:
	static std::vector<Tween*> s_tweens;
	static std::vector<Tween*> s_inactiveTweens;

	bool m_active;
	float* m_target;
	float m_elapsedTime;
};

#endif
